home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK1.toast / Development Kits (Disc 1) / Open Transport / Sample Code / DLPI / ATM PCI DLPI / MPW Build / MakeFiles / atmdlpiCFM.make
Encoding:
Text File  |  1995-08-03  |  4.5 KB  |  139 lines  |  [TEXT/MPS ]

  1. #############################################################################
  2. #
  3. #    Contains:    Builds a CFM shared library which is an ATM PCI DLPI. Please read
  4. #                the build instructions file in order to setup certain
  5. #                MPW variables which are necessary for this makefile.
  6. #
  7. #    Written by:    
  8. #
  9. #    Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  10. #
  11. #    Change History (most recent first):
  12. #
  13. #
  14. #
  15. #############################################################################
  16.  
  17. DLPISRC     = :::Sources:
  18. OBJ            = ::Objects:
  19. BLT            = ::Built:
  20.  
  21. #————————————————————————————————————————————————————————————————————————————————————
  22. #    OTDevTools should point to the Open Transport SDK Folder
  23. #————————————————————————————————————————————————————————————————————————————————————
  24.  
  25. OTClientIncludes    = {OTDevTools}Open Tpt Client Developer:Includes:CIncludes:                
  26. OTModuleIncludes    = {OTDevTools}Open Tpt Module Developer:Includes:
  27. OTModuleLibraries    = {OTDevTools}Open Tpt Module Developer:Libraries:
  28.  
  29. MakeFile = atmdlpiCFM.make
  30. LibName = "ABCVendorATMDLPI"
  31. Lib_Type = 'ndrv'
  32. Lib_Creator = 'cfrg'
  33. Lib_Objects =                     ∂
  34.         "{OBJ}"ATMDLPI.c.o         ∂
  35.         "{OBJ}"PCIRoutines.c.o    ∂
  36.         "{OBJ}"HWSpecific.c.o
  37.         
  38. Lib_Resources = "{DLPISRC}ResourceTemplate.r"
  39.  
  40. #————————————————————————————————————————————————————————————————————————————————————
  41. #    External Libraries
  42. #————————————————————————————————————————————————————————————————————————————————————
  43.  
  44. PPC_Sys_Libraries = ∂
  45.                     "{PPCLibraries}"InterfaceLib.xcoff             ∂
  46.                     "{PPCLibraries}"StdCLib.xcoff                 ∂
  47.                     "{PPCLibraries}"StdCRuntime.o                 ∂
  48.                     "{PPCLibraries}"PPCCRuntime.o                 ∂
  49.                     "{OTModuleLibraries}OpenTptModuleLib"        ∂
  50.                     "{DriverLibraries}"DriverServicesLib        ∂
  51.                     "{DriverLibraries}"NameRegistryLib            ∂
  52.                     "{DriverLibraries}"PCILib
  53.  
  54. PPC_Lib_Equates = ∂
  55.                     -librename InterfaceLib.xcoff=InterfaceLib ∂
  56.                      -librename StdCLib.xcoff=StdCLib
  57.  
  58. #————————————————————————————————————————————————————————————————————————————————————
  59. #    Export values for CFM
  60. #————————————————————————————————————————————————————————————————————————————————————
  61.  
  62. DriverDescHeader         = TheDriverDescription                
  63.  
  64. OTInitModule            = InitStreamModule                    
  65. OTTerminateModule        = TerminateStreamModule
  66. OTInstallInfo             = GetOTInstallInfo
  67. OTInitHardware            = ValidateHardware
  68.  
  69. CFMInitRoutine            = InitCFMRoutine
  70. CFMTerminateRoutine        = TerminateCFMRoutine
  71.  
  72. #————————————————————————————————————————————————————————————————————————————————————
  73. #    C Files
  74. #————————————————————————————————————————————————————————————————————————————————————
  75.  
  76. .c.o ƒ .c {MakeFile} "{DLPISRC}"ATMDLPI.h "{DLPISRC}"HWSpecific.h "{DLPISRC}"PCIRoutines.h
  77.      MrC {MrC_Options}  {DepDir}{Default}.c -o {Targ}
  78.  
  79. #————————————————————————————————————————————————————————————————————————————————————
  80. #    OPTIONS
  81. #————————————————————————————————————————————————————————————————————————————————————
  82.  
  83. SymOpt                  = on
  84. PPCCOpt                 = off
  85.  
  86. MrC_Options =    -sym {SymOpt} -opt {PPCCOpt} -shared_lib_export on ∂
  87.                 -D NoASM -D RS6000=0 -D powerpc=1 -D interface_glue ∂
  88.                 -d ATM_DEBUG -d LOOPBACK_TEST ∂
  89.                 -export_list {OBJ}NotUsedExportList    ∂
  90.                    -i "{OTModuleIncludes}"             ∂
  91.                    -i "{OTClientIncludes}"             ∂
  92.                    -i "{DriverHeaders}"                 ∂
  93.                 -i "{CIncludes}"                    ∂
  94.                 -i "{ATMHeaders}"
  95.  
  96. PPCLink_Options = -sym {SymOpt} -xm s -outputformat xcoff
  97.  
  98.  
  99. #————————————————————————————————————————————————————————————————————————————————————
  100. #    DEPENDENCIES
  101. #————————————————————————————————————————————————————————————————————————————————————
  102.  
  103. "{OBJ}"            ƒ     "{DLPISRC}"
  104.  
  105. atmdlpiCFM            ƒ     {BLT}{LibName} 
  106.  
  107. #————————————————————————————————————————————————————————————————————————————————————
  108. #    CREATE LIBRARY
  109. #————————————————————————————————————————————————————————————————————————————————————
  110.  
  111. {BLT}{LibName} ƒƒ {OBJ}{LibName}.xcoff
  112.     MakePEF {Deps} -o {BLT}{LibName} ∂
  113.             -i {CFMInitRoutine}    ∂
  114.             -t {CFMTerminateRoutine}    ∂
  115.             {PPC_Lib_Equates} ∂
  116.             -ft {Lib_Type} -fc {Lib_Creator}
  117.  
  118. {OBJ}{LibName}.xcoff ƒ  {Lib_Objects}
  119.     PPCLink {PPCLink_Options}  ∂
  120.             -export {DriverDescHeader} ∂
  121.             -export {OTInitModule} ∂
  122.             -export {OTTerminateModule} ∂
  123.             -export    {OTInstallInfo} ∂
  124.             -export    {OTInitHardware} ∂
  125.             -export    {CFMInitRoutine} ∂
  126.             -export {CFMTerminateRoutine} ∂
  127.             {Lib_Objects} ∂
  128.             {PPC_Sys_Libraries} ∂
  129.             -o {OBJ}{LibName}.xcoff
  130.     If "{SymOpt}" =~ /[oO][nN]/
  131.        MakeSYM {OBJ}{LibName}.xcoff -i {DLPISRC} -w -o {OBJ}{LibName}.xSYM
  132.     End
  133.  
  134. {BLT}{LibName} ƒƒ {Lib_Resources} {MakeFile}
  135.     Rez     -t {Lib_Type} -c {Lib_Creator} ∂
  136.             {Lib_Resources} -a -o {BLT}{LibName}
  137.     SetFile {BLT}{LibName} -a ib
  138.     echo "Done building the DLPI"
  139.